<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateScalesTable extends Migration
{
    /**
     * Run the migrations.
     */
    public function up(): void
    {
        Schema::create('scales', function (Blueprint $table) {
//            $table->comment('量表考核表');
            $table->bigIncrements('id');
            $table->string('name', 128)->comment('量表名称');
            $table->boolean('type')->default(false)->comment('分类 1-岗位竞聘 2-年度考核 3-教研活动');
            $table->string('tier', 32)->default('')->comment('层级');
            $table->char('tier_code', 4)->default('')->comment('层级编码');
            $table->boolean('enable')->default(false)->comment('1-启用 2-不启用');
            $table->tinyInteger('score')->default(0)->comment('总分');
            $table->text('files')->nullable();
            $table->text('links')->nullable();
            $table->text('remark')->nullable()->comment('说明');
            $table->string('user_id', 32)->default('')->comment('创建人关联user_id');
            $table->string('opt_name', 32)->default('')->comment('创建人');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::dropIfExists('scales');
    }
};
